//
//  WSOrderModel.m
//  FD
//
//  Created by Yasin on 2018/10/23.
//  Copyright © 2018年 ZhiYuan Network. All rights reserved.
//

#import "WSOrderModel.h"
#import "NSObject+Runtime.h"
@implementation WSOrderModel

+ (NSDictionary *)mj_replacedKeyFromPropertyName {
    return @{@"orderId":@"id"};
}


/**重写description 对象*/
- (NSString *)description {
       NSArray *ptyArr = [WSOrderModel rb_objPropeties];
    
    return [[self dictionaryWithValuesForKeys:ptyArr] description];
}

//重写setter 重新赋值
- (void)setShop:(NSDictionary *)shop {
    _shop = shop;
    
    //拼接图片url
//    _thumbnail = [NSString stringWithFormat:@"%@%@",kPicDomain,shop[@"thumbnail"]];
}

- (void)setGoodsList:(NSArray *)goodsList {
    _goodsList = goodsList;
    
    //订单个数
    _count = (NSInteger)goodsList.count;
    
    if (goodsList.count) {
        NSDictionary *firstDic = [goodsList firstObject];
        _thumbnail = [NSString stringWithFormat:@"%@%@",kPicDomain,firstDic[@"thumbnail"]];
    }
}

@end
